import { createRouter, createWebHistory } from "vue-router";
import index from "@/views/index/index.vue";

const routes = [
  { path: '/', redirect: '/index'},
  { path: '/index', component: index },
  { path: '/playlist', name: 'playlist', component: () => import(/* webpackChunkName: "playlist" */'@/views/playList/')},
  { path: '/playlist/detail', name: 'playListDetail', component: () => import(/* webpackChunkName: "playListDetail" */'@/views/playList/Detail.vue')},
  { path: '/song', name: 'song', component: () => import(/* webpackChunkName: "song" */'@/views/song/')},
  { path: '/singer', name: 'singer', component: () => import(/* webpackChunkName: "singer" */'@/views/singer/')},
  { path: '/mvlist', name: 'mvlist', component: () => import(/* webpackChunkName: "mvlist" */'@/views/mvlist/')},
  { path: '/mv', name: 'mv', component: () => import(/* webpackChunkName: "mv" */'@/views/mvlist/Detail.vue')},
  { path: '/album', name: 'album', component: () => import(/* webpackChunkName: "album" */'@/views/album/')},
  { path: '/rank', name: 'rank', component: () => import(/* webpackChunkName: "rank" */'@/views/rank/')},
  { path: '/artist', name: 'artist', component: () => import(/* webpackChunkName: "artist" */'@/views/artist/')},
  { path: '/search', name: 'search', component: () => import(/* webpackChunkName: "search" */'@/views/search/')},
  { path: '/video', name: 'video', component: () => import(/* webpackChunkName: "video" */'@/views/video/')},

];

console.log(process.env.BASE_URL);
const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes,
});

export default router;
